-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add file resource provider for EG standalone mode #3159
Conversation
Signed-off-by: shawnh2 <[email protected]>
… provider Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in today's meeting, I prefer to remove the EnvoyGatewayCustomProvider
and add a flat EnvoyGatewayFileProvider
(or a better name).
Custom is needed to allow for different resource and infra provider |
Add it later when a use case comes out? The File/Host Provider is not a custom provider, it's a known one. |
use case exists today - file resource provider and host infra provider to implement standalone case, running EG in a docker container or bare metal directly w/o any API server |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan on releasing this in v1.1.0 ?
cc @arkodg
yeah I'm a +1 for this, prioritizing other PRs right now, will get to this one soon |
will split changes of |
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions! |
Hi, does it set |
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3159 +/- ##
==========================================
- Coverage 67.99% 66.54% -1.45%
==========================================
Files 190 195 +5
Lines 23130 23699 +569
==========================================
+ Hits 15727 15771 +44
- Misses 6284 6809 +525
Partials 1119 1119 ☔ View full report in Codecov by Sentry. |
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
// - This issue is tracked by https://github.com/envoyproxy/gateway/issues/3207 | ||
// | ||
// convertKubernetesYAMLToResources converts a Kubernetes YAML string into GatewayAPI Resources. | ||
func convertKubernetesYAMLToResources(str string) (*gatewayapi.Resources, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should deal with ReferenceGrant
type resource in this func?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should. This PR only leverage the basic functionality for file-provider, as described in the comments here, this function will be revisited along with the one in egctl x translate.
Signed-off-by: shawnh2 <[email protected]>
You can start file-provider mode like apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyGateway
gateway:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
provider:
type: Custom
custom:
resource:
type: File
file:
paths: ["test/"]
logging:
level:
default: info |
Signed-off-by: shawnh2 <[email protected]>
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks
) * add validations for envoy-gateway file resource type Signed-off-by: shawnh2 <[email protected]> * improve eg validation and add resource provider interface for various provider Signed-off-by: shawnh2 <[email protected]> * extract common gatewayapi layer translate logic in egctl translate Signed-off-by: shawnh2 <[email protected]> * add notifier support Signed-off-by: shawnh2 <[email protected]> * fix lint and move read yaml bytes function back to translate Signed-off-by: shawnh2 <[email protected]> * add resources store support Signed-off-by: shawnh2 <[email protected]> * fix lint Signed-off-by: shawnh2 <[email protected]> * fix ci Signed-off-by: shawnh2 <[email protected]> * update infra provider api and address comments Signed-off-by: shawnh2 <[email protected]> * update custom provider comments and validate method test Signed-off-by: shawnh2 <[email protected]> * restore extension manager and add health probe server for file provider Signed-off-by: shawnh2 <[email protected]> * update envoy gateway helper functions Signed-off-by: shawnh2 <[email protected]> * add some unit tests Signed-off-by: shawnh2 <[email protected]> * properly handle the remove event for the file provider Signed-off-by: shawnh2 <[email protected]> * fix lint Signed-off-by: shawnh2 <[email protected]> * no default to k8s for infra provider Signed-off-by: shawnh2 <[email protected]> * fix runner Signed-off-by: shawnh2 <[email protected]> --------- Signed-off-by: shawnh2 <[email protected]> Co-authored-by: Xunzhuo <[email protected]> Signed-off-by: NCSham <[email protected]>
What type of PR is this?
What this PR does / why we need it:
This PR implement two component for file resource provider: Notifier and ResourceStore.
Which issue(s) this PR fixes:
related #1393
There're some TODOs in this PR, tracked by #3213 #3207